package work20241207_chap8.n_demo11;

/**
 * @author zdl
 * @date 2024/12/5
 */
public class Demo {
    public static void main(String[] args) {
        Shape shape = new Circle(3);
        shape.area();
        shape.girth();
        System.out.println();

        Shape shape1 = new Rect();
       double a1 = shape1.area();
        System.out.println(a1);
       double b= shape1.girth();
        System.out.println(b);
        System.out.println();

        Shape shape2 = new Square();
        double c=shape2.area();
        System.out.println(c);
       double d= shape2.girth();
        System.out.println(d);
        System.out.println();

        Circle circle = new Circle(3);
        Rect rect = new Rect();
        Square square = new Square();
        Shape[] shapes = new Shape[3];
        shapes[0] = circle;
        shapes[1] = rect;
        shapes[2] = square;
        A a = new A();
        a.test(shapes);

    }
}
